<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>发射机运行状态</title>
    <link th:href="@{../../component/pear/css/pear.css}" rel="stylesheet">

    <script th:src="@{../../component/layui/layui.js}"></script>
    <script th:src="@{../../component/pear/pear.js}"></script>
</head>
<style>
    .layui-form-label {
        width: 200px !important;
        text-align: left !important;
    }

    .layui-form-item .layui-input-inline {
        width: 200px !important;
        margin-bottom: 0px !important;
    }

    .layui-form-item-te {
        margin-bottom: 0px !important;
    }
</style>
<body class="pear-container">
    <div class="layui-card">
            <form class="layui-form layui-form-pane" action="" id="runningstatusform"  lay-filter="runningstatusform">
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 1%;">
                    <label class="layui-form-label" style="width: 7%">台站ID</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="stationCode" name="stationCode" autocomplete="off" readonly>
                    </div>
                    <label class="layui-form-label" style="width: 7%">发射机ID</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="transCode" name="transCode" autocomplete="off" readonly>
                    </div>
                    <label class="layui-form-label" style="width: 7%">数据观测时间</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="viewTime" name="viewTime" autocomplete="off" >
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">整机输出功率(W)</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="outputPower" name="outputPower" autocomplete="off" readonly>
                    </div>
                    <label class="layui-form-label" style="width: 7%">整机反射功率(W)</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="reflectedPower" name="reflectedPower" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">整机驻波比(W)</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="lopsidedPower" name="lopsidedPower" autocomplete="off" >
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">整机功放电压(V)</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="powerAmplifierVoltage" name="powerAmplifierVoltage" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">整机电流</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="powerAmplifierCurrent" name="powerAmplifierCurrent" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">机箱温度</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="temperature" name="temperature" autocomplete="off" >
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">功放温度</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="powerTemperature" name="powerTemperature" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">调制度(00~99,表示调幅度0-99%)</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="modulateDegree" name="modulateDegree" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">发射机天线程式</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="antennaProgram" name="antennaProgram" autocomplete="off" >
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">ARf工作频率(Hz)</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelAFreq" name="channelAFreq" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">ARf开关</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <select id="channelARfChState" name="channelARfChState" lay-verify="required"  >
                            <option value="0">开</option>
                            <option value="1">关</option>
                        </select>
                    </div>
                    <label class="layui-form-label" style="width: 7%">ARf跳频时隙</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelATimeSlot" name="channelATimeSlot" autocomplete="off" >
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">ARf输出功率</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelAEqualization" name="channelAEqualization" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">ARf模式</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <select id="channelARfChMod" name="channelARfChMod" lay-verify="required"  >
                            <option value="0">单音</option>
                            <option value="1">AM</option>
                            <option value="2">FM</option>
                        </select>
                    </div>
                    <label class="layui-form-label" style="width: 7%">ARf调制宽度</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelARfChBand" name="channelARfChBand" autocomplete="off" >
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">ARf音源</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <select id="channelARfChASource" name="channelARfChASource" lay-verify="required"  >
                            <option value="0">白噪声</option>
                            <option value="1">1k单音</option>
                            <option value="2">外部音源 </option>
                            <option value="3">静音 /option>
                            <option value="4">文件白噪声</option>
                            <option value="5">文件打击乐</option>
                        </select>
                    </div>
                    <label class="layui-form-label" style="width: 7%">ARf音源地址</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelARfChAUrl" name="channelARfChAUrl" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">channelB工作频率</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelBFreq" name="channelBFreq" autocomplete="off" >
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">BRf开关</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <select id="channelBRfChState" name="channelBRfChState" lay-verify="required"  >
                            <option value="0">开</option>
                            <option value="1">关</option>
                        </select>
                    </div>
                    <label class="layui-form-label" style="width: 7%">BRf跳频时隙</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelBTimeSlot" name="channelBTimeSlot" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">BRf输出功率</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelBEqualization" name="channelBEqualization" autocomplete="off" >
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">BRf模式</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <select id="channelBRfChMod" name="channelBRfChMod" lay-verify="required"  >
                            <option value="0">单音</option>
                            <option value="1">AM</option>
                            <option value="2">FM</option>
                        </select>
                    </div>
                    <label class="layui-form-label" style="width: 7%">BRf调制宽度</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelBRfChBand" name="channelBRfChBand" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">BRf音源类型</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <select id="channelBRfChASource" name="channelBRfChASource" lay-verify="required"  >
                            <option value="0">白噪声</option>
                            <option value="1">1k单音</option>
                            <option value="2">外部音源 </option>
                            <option value="3">静音 /option>
                            <option value="4">文件白噪声</option>
                            <option value="5">文件打击乐</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">BRf音源地址</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelBRfChAUrl" name="channelBRfChAUrl" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">BRf工作频率</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelCFreq" name="channelCFreq" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">CRf开关</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <select id="channelCRfChState" name="channelCRfChState" lay-verify="required"  >
                            <option value="0">开</option>
                            <option value="1">关</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">CRf跳频时隙</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelCTimeSlot" name="channelCTimeSlot" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">CRf输出功率</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelCEqualization" name="channelCEqualization" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">CRf模式</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <select id="channelCRfChMod" name="channelCRfChMod" lay-verify="required"  >
                            <option value="0">CW</option>
                            <option value="1">AM</option>
                            <option value="2">FM</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">CRf调制宽度</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelCRfChBand" name="channelCRfChBand" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">CRf音源类型</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <select id="channelCRfChASource" name="channelCRfChASource" lay-verify="required"  >
                            <option value="0">白噪声</option>
                            <option value="1">1k单音</option>
                            <option value="2">外部音源 </option>
                            <option value="3">静音 /option>
                            <option value="4">文件白噪声</option>
                            <option value="5">文件打击乐</option>
                        </select>
                    </div>
                    <label class="layui-form-label" style="width: 7%">CRf音源地址</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelCRfChAUrl" name="channelCRfChAUrl" autocomplete="off" >
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">channelD工作频率</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelDFreq" name="channelDFreq" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">DRf开关</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <select id="channelDRfChState" name="channelDRfChState" lay-verify="required"  >
                            <option value="0">开</option>
                            <option value="1">关</option>
                        </select>
                    </div>
                    <label class="layui-form-label" style="width: 7%">DRf跳频时隙</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelDTimeSlot" name="channelDTimeSlot" autocomplete="off" >
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">DRf输出功率</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelDEqualization" name="channelDEqualization" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">DRf模式</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <select id="channelDRfChMod" name="channelDRfChMod" lay-verify="required"  >
                            <option value="0">单音</option>
                            <option value="1">AM</option>
                            <option value="2">FM</option>
                        </select>
                    </div>
                    <label class="layui-form-label" style="width: 7%">DRf调制宽度</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelDRfChBand" name="channelDRfChBand" autocomplete="off" >
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-te" style="padding-left: 10%;padding-top: 0.5%;">
                    <label class="layui-form-label" style="width: 7%">DRf音源类型</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <select id="channelDRfChASource" name="channelDRfChASource" lay-verify="required"  >
                            <option value="0">白噪声</option>
                            <option value="1">1k单音</option>
                            <option value="2">外部音源 </option>
                            <option value="3">静音 /option>
                            <option value="4">文件白噪声</option>
                            <option value="5">文件打击乐</option>
                        </select>
                    </div>
                    <label class="layui-form-label" style="width: 7%">音源地址</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="channelDRfChAUrl" name="channelDRfChAUrl" autocomplete="off" >
                    </div>
                    <label class="layui-form-label" style="width: 7%">上报时间</label>
                    <div class="layui-input-inline" style="width: 12%">
                        <input type="text" class="layui-input" id="sendTime" name="sendTime" autocomplete="off" >
                    </div>
                </div>
                <div class="layui-form-item" style="padding-left: 30%;padding-top: 2%;">
                    <div class="layui-input-block" >
                        <button class="layui-btn" th:type="button" lay-filter="closeTransmiter" onclick="closeTransmiter()">
                            关闭
                        </button>
                    </div>
                </div>
            </form>
    </div>

    <script>

        layui.use(['table', 'form', 'jquery', 'popup'], function () {
            let table = layui.table;
            let form = layui.form;
            let $ = layui.jquery;
            let popup = layui.popup;
            let MODULE_PATH = "/system/transmitter/";

            $("#stationCode").val(getQueryString("stationCode"));
            $("#transCode").val(getQueryString("transCode"));

            function getQueryString(name) {
                var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
                var r = window.location.search.substr(1).match(reg);
                if (r != null) {
                    return unescape(r[2]);
                }
                return null;
            }
            var d = {};
            var t = $('#runningstatusform').serializeArray();
            $.each(t, function() {
                d[this.name] = this.value;
            });
            $.ajax({
                url: MODULE_PATH + 'getTransmitterRunningStatus',
                type: 'POST',
                contentType: 'application/json;charset=UTF-8',
                data: JSON.stringify(d),
                success: function (data) {
                    if (data.code === 200) {
                        form.val("runningstatusform", data.data);
                    } else {
                        popup.failure(data.msg);
                    }
                },
                error: function () {
                    popup.failure("编辑或详情发射机接口访问失败!")
                }
            });

            window.closeTransmiter = function() {
                window.parent.location.reload();
                varindex = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            }

        })

    </script>
</body>
</html>
